import request from '../../utils/request.js'


export const getDateil=(id)=>request({
	method:'post',
	url:`/articles/view/${id}`
})

// 获取文章评论  /comments/article/{id}
export const getcommentsList=(id)=>request({
	method:"get",
	url:`/comments/article/${id}`
})

// 评论 /comments/create/change post 
export const createComments=(data)=>request({
	method:"post",
	url:"/comments/create/change",
	data
})

// 删除评论 /comments/delete/{id} post 
export const deleteComment =(id)=>request({
	method:"post",
	url:`/comments/delete/${id}`,
})


// 最新文章 /articles/new  get 
export const newArticles=()=>request({
	url:'/articles/new',
	method:'get'
})



// /articles/hot 最热文章 get 
export const hotArticles=()=>request({
	url:'/articles/hot',
	method:'get'
})


//   /users/user/{id}    根据文章获取作者信息   get 
export const getUser=(id)=>request({
	url:`/users/user/${id}`,
	method:'get'
})
